<?php
    include APPLICATION_PATH . '/application/views/head.phtml';
    include APPLICATION_PATH . '/application/views/top.phtml';
    include APPLICATION_PATH . '/application/views/left.phtml';
?>

<script src="/public/pagejs/two_list21.js?v1.0"></script>

<div id="thispage" data-id="82"></div>


 
        <!-- END SIDEBAR -->

        <!-- BEGIN PAGE -->

        <div class="page-content">

            <!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->

            <div id="portlet-config" class="modal hide">

                <div class="modal-header">

                    <button data-dismiss="modal" class="close" type="button"></button>

                    <h3>portlet Settings</h3>

                </div>

                <div class="modal-body">

                    <p>Here will be a configuration form</p>

                </div>

            </div>

            <!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->

            <!-- BEGIN PAGE CONTAINER-->        

            <div class="container-fluid">

                <!-- BEGIN PAGE HEADER-->

                <div class="row-fluid">

                    <div class="span12">

                        <!-- BEGIN STYLE CUSTOMIZER -->

                        <div class="color-panel hidden-phone">

                            <!-- <div class="color-mode-icons icon-color"></div> -->

                            <div class="color-mode-icons icon-color-close"></div>

                            <div class="color-mode">

                                <p>THEME COLOR</p>

                                <ul class="inline">

                                    <li class="color-black current color-default" data-style="default"></li>

                                    <li class="color-blue" data-style="blue"></li>

                                    <li class="color-brown" data-style="brown"></li>

                                    <li class="color-purple" data-style="purple"></li>

                                    <li class="color-grey" data-style="grey"></li>

                                    <li class="color-white color-light" data-style="light"></li>

                                </ul>

                                <label>

                                    <span>Layout</span>

                                    <select class="layout-option m-wrap small">

                                        <option value="fluid" selected>Fluid</option>

                                        <option value="boxed">Boxed</option>

                                    </select>

                                </label>

                                <label>

                                    <span>Header</span>

                                    <select class="header-option m-wrap small">

                                        <option value="fixed" selected>Fixed</option>

                                        <option value="default">Default</option>

                                    </select>

                                </label>

                                <label>

                                    <span>Sidebar</span>

                                    <select class="sidebar-option m-wrap small">

                                        <option value="fixed">Fixed</option>

                                        <option value="default" selected>Default</option>

                                    </select>

                                </label>

                                <label>

                                    <span>Footer</span>

                                    <select class="footer-option m-wrap small">

                                        <option value="fixed">Fixed</option>

                                        <option value="default" selected>Default</option>

                                    </select>

                                </label>

                            </div>

                        </div>

                        <!-- END BEGIN STYLE CUSTOMIZER -->  

                        <!-- BEGIN PAGE TITLE & BREADCRUMB-->

                        <h3 class="page-title">

                            栏目管理 

                        </h3>

                        <ul class="breadcrumb">

                            <li>

                                <i class="icon-home"></i>
                                <span>当前位置：</span>
                                <span>首页</span>

                                <i class="icon-angle-right"></i>

                            </li>

                            <li>

                                <span>栏目管理</span>

                                <i class="icon-angle-right"></i>

                            </li>

                            <li><span>电子商务</span></li>

                        </ul>

                        <!-- END PAGE TITLE & BREADCRUMB-->

                    </div>

                </div>

                <!-- END PAGE HEADER-->

                <!-- BEGIN PAGE CONTENT-->

                <div class="row-fluid">

                    <div class="span6 responsive" data-tablet="span12 fix-offset" data-desktop="span6" style="width:100%;">

                        <!-- BEGIN EXAMPLE TABLE PORTLET-->

                        <div class="portlet box grey">

                            <div class="portlet-title">

                                <div class="caption"><i class="icon-user"></i>电子商务</div>

                                <div class="actions controls">

                                    <a href="#form_modal_tj"  data-toggle="modal" data-target="#form_modal_tj" class="btn blue"><i class="icon-pencil"></i> 添加</a>

                                </div>

                            </div>

                            <div class="portlet-body">

                                <table class="table table-striped table-bordered table-hover" id="current_table">

                                    <thead>

                                        <tr>
                                            <th>网站名称</th>
                                            <th>二级栏目</th>
                                            <th>创建时间</th>
                                            <th>操作</th>
                                        </tr>

                                    </thead>

                                <tbody id="tbody">
<?php
    foreach ($category_two_list as $k => $v) {
        
        $style = (0 == ($k % 2)) ? 'odd' : 'even';
        echo <<< EOF
    
                                        <tr class="{$style} gradeX">

                                            <td>{$v['url']}</td>
                                            <td>{$v['name']} </td>
                                            <td>{$v['current_time']}</td>
                                            
                                            <td item_id="{$v['sites_id']}" category_id="{$v['category_id']}"><a class="tableDelete" href="/Two/del/id/{$v['category_two_id']}">删除</a> / <a class="tableEdit" href="/Two/edit/id/{$v['category_two_id']}">修改</a>
                                        </tr>
EOF;
    }

?>
                                    </tbody>

                </table>

<div id="pages">
<?php
    if($category_two_list[0]['rows']/$category_two_list[0]['every_page']<=1)
        {
            
        }
        else
        {
            print_r($allpage);
        }
?>
</div>
                            </div>

                        </div>
                                       
                                <div id="form_modal_tj" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel3" aria-hidden="true">

                                    <div class="modal-header">

                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>

                                        <h3 id="myModalLabel3">添加二级栏目列表</h3>

                                    </div>

                                    <div class="modal-body">

                                        <form action="#" id="form_article_add" method="post" class="form-horizontal">
                                         <div class="control-group">

                                                <label class="control-label">网站名称</label>

                                                <div class="controls">

                                                     <select class="colorpicker-default m-wrap" name="push_address" id="push_address" >
<?php
     /*foreach ($sites_list AS $k => $v) {
         echo '<option value="'.$v['sites_id'].'" data-id="' . $v['category_id'] . '">' . $v['url'] . '</option>';
     }*/
?> 
                                                    </select>


                                                </div>

                                            </div>

                                            <div class="control-group">


                                                <label class="control-label">添加一级栏目</label>

                                                <div class="controls">
                                                	<select class="colorpicker-default m-wrap" name="pushOne_module" id="pushOne_module" >
                                                	
<?php
    foreach ($category_list AS $k => $v) {
        echo '<option value="'.$v['category_id'].'" data-id="' . $v['category_id'] . '">' . $v['name'] . '</option>';
    }
?>                                                  
                                                    </select>
                                                </div>

                                            </div>


                                            <div class="control-group">


                                                <label class="control-label">添加二级栏目</label>

                                                <div class="controls">
                                                <input type="text" class="colorpicker-default m-wrap" name="pushTwo_module" value="" id="pushTwo_module">                                                  

                                                </div>

                                            </div>

                                            
                                           

                                        </form>

                                    </div>
                 
                                    <div class="modal-footer">

                                        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>

                                        <button class="btn green btn-primary" id="submit_form" data-dismiss="modal" >提交</button>
                                        
                                    </div>

                                </div>

                                <div id="form_modal_edit" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel3" aria-hidden="true">

                                    <div class="modal-header">

                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>

                                        <h3 id="myModalLabel3">修改二级栏目列表</h3>

                                    </div>

                                    <div class="modal-body">

                                        <form action="#" id="form_article_edit" method="post" class="form-horizontal">
                                        <div class="control-group">
                                            
                                            
                                                <div class="controls">
  
                                                </div>
                                            
                                            </div> 

                                            <div class="control-group">
                                            
                                                <label class="control-label">网站名臣</label>
                                            
                                                <div class="controls">
                                            
                                                    <select class="colorpicker-default m-wrap" name="push_address" id="pushAddress">
<?php
    foreach ($sites_list AS $k => $v) {
        echo '<option value="'.$v['sites_id'].'" data-id="' . $v['sites_id'] . '">' . $v['name'] . '</option>';
    }
?> 
                                                        
                                                    </select>
                                            
                                                </div>
                                            
                                            </div> 

                                            <div class="control-group">
                                            
                                                <label class="control-label">修改一级栏目</label>
                                            
                                                <div class="controls">

                                                	<select class="colorpicker-default m-wrap" name="pushOne_Module" id="pushOne_Module">
                                                    
<?php
    foreach ($category_list AS $k => $v) {
        echo '<option value="'.$v['category_id'].'" data-id="' . $v['category_id'] . '">' . $v['name'] . '</option>';
    }
?> 
                                                    </select>

                                            
                                                </div>
                                            
                                            </div> 

                                            
                                            
                                             <div class="control-group">
                                            
                                                <label class="control-label">修改二级栏目</label>
                                            
                                                <div class="controls">
                                                    <input type="text" class="colorpicker-default m-wrap" name="pushTwo_Module" value="" id="pushTwo_Module">

                                            
                                                </div>
                                            
                                            </div> 

                                            

                                        </form>

                                    </div>

                                    <div class="modal-footer">

                                        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>

                                        <button class="btn green btn-primary" id="edit_form" data-dismiss="modal" >提交</button>
                                        
                                    </div>

                                </div>




                                


                        <!-- END EXAMPLE TABLE PORTLET-->

                    </div>

                </div>

                <!-- END PAGE CONTENT-->

            </div>

            <!-- END PAGE CONTAINER-->

        </div>

    <!-- END PAGE -->
<?php
    include APPLICATION_PATH . '/application/views/foot.phtml';
?>

